#include "DXUT.h" // this include has to be included in the beginning of each source file for compiling

#include "./../Headers/define_dx.h"

//const float default_tesselation_factor = 10.0;

namespace ShaderSpace {

	string& operator += ( string &str, const IDC &obj ) {
		if( obj == IDC_TOGGLEFULLSCREEN ) return str += "Toggle Fullscreen";
		if( obj == IDC_TOGGLEREF ) return str += "Toggle Reference";
		if( obj == IDC_CHANGEDEVICE ) return str += "Change Device";
		if( obj == IDC_PATCH_SUBDIVS ) return str += "Patch Subdivision";
		if( obj == IDC_PATCH_SUBDIVS_STATIC ) return str += "Patch Subdivision Static Text";
		if( obj == IDC_TOGGLE_LINES ) return str += "Toggle Lines";
		if( obj == IDC_PARTITION_MODE ) return str += "Partition Mode";
		if( obj == IDC_PARTITION_INTEGER ) return str += "Partition Integer";
		if( obj == IDC_PARTITION_FRAC_EVEN ) return str += "Partition Fractional Even";
		if( obj == IDC_PARTITION_FRAC_ODD ) return str += "Partition Fractional Odd";
		if( obj == IDC_SURFACE_SELECTION ) return str += "Surface Selection";
		if( obj == IDC_TIME_POSITION ) return str += "Time Position";
		if( obj == IDC_TIME_POSITION_STATIC_TEXT ) return str += "Time Position Static Text";
		
		return str += "Unknown";
	};

	string& operator += ( string &str, const D3D11_USAGE &obj ) {
		if( obj == D3D11_USAGE_DEFAULT ) return str += "Usage Default";
		if( obj == D3D11_USAGE_DYNAMIC ) return str += "Usage Dynamic";
		if( obj == D3D11_USAGE_IMMUTABLE ) return str += "Usage Immutable";
		if( obj == D3D11_USAGE_STAGING ) return str += "Usage Staging";
		return str += "Unknown";
	};

	string& operator += ( string &str, const D3D11_BIND_FLAG &obj ) {
		if( obj == D3D11_BIND_CONSTANT_BUFFER ) return str += "Bind Constant Buffer";
		if( obj == D3D11_BIND_DEPTH_STENCIL ) return str += "Bind Depth Stencil";
		if( obj == D3D11_BIND_INDEX_BUFFER ) return str += "Bind Index Buffer";
		if( obj == D3D11_BIND_RENDER_TARGET ) return str += "Bind Render Target";
		if( obj == D3D11_BIND_SHADER_RESOURCE ) return str += "Bind Shader Resource";
		if( obj == D3D11_BIND_STREAM_OUTPUT ) return str += "Bind Stream Output";
		if( obj == D3D11_BIND_UNORDERED_ACCESS ) return str += "Bind Unordered Access";
		if( obj == D3D11_BIND_VERTEX_BUFFER ) return str += "Bind Vertex Buffer";
		return str += "Unknown";
	};

	string& operator += ( string &str, const D3D11_CPU_ACCESS_FLAG &obj ) {
		if( obj == D3D11_CPU_ACCESS_READ ) return str += "CPU Access to Read";
		if( obj == D3D11_CPU_ACCESS_WRITE ) return str += "CPU Access to Write";
		return str += "Unknown";
	};

};
